
'use strict'
import { View } from '../../../component'
import style from './css.css'

class RechargeList extends React.Component {
  static propTypes = {
    list: PropTypes.object,
    transferShow: PropTypes.func,
    index: PropTypes.number,
    history: PropTypes.object
  }
  _handerRecharge = this._handerRecharge.bind(this)

  _handerRecharge () {
    const { list } = this.props
    window.location.href = `imgotv://coinpay?f=${list.money}`
    // this.props.transferShow(list.money)
  }
  render () {
    const { list, index } = this.props
    return (
      <View className={style.rechargeList} tap={this._handerRecharge}>
        <View className={style.listHead}>
          <View className={style.headGold}>{list.gold}</View>
        </View>
        <View className={list.presented ? style.presented : style.hide}>再送{list.presented}金币</View>
        <View className={style[`moneyIcon${index}`]}></View>
        <View className={style.rechargeMoney}>￥{list.money}</View>
      </View>
    )
  }
}

export default RechargeList
